<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>06.关于执行栈</title>
  </head>

  <body>

  </body>
  <script>
    function task1() {
      console.log('task1执行')
      task2()
      console.log('task2执行完毕')
    }

    function task2() {
      console.log('task2执行')
      task3()
      console.log('task3执行完毕')
    }

    function task3() {
      console.log('task3执行')
    }
    task1()
    console.log('task1执行完毕')
    /*
      task1执行
      task2执行
      task3执行
      task3执行完毕
      task2执行完毕
      task1执行完毕
      */
  </script>

</html>